import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:table',
      order: 1000,
      title: $t('route.lowcode'),
    },
    name: 'Lowcode',
    path: '/lowcode',
    children: [
      {
        name: 'LowcodeGeneric',
        path: '/lowcode/generic',
        component: () => import('#/views/lowcode/generic/index.vue'),
        meta: {
          icon: 'lucide:database',
          title: '通用表格管理',
          hideInMenu: true, // 隐藏在菜单中，通过动态生成访问
        },
      },
      {
        name: 'LowcodeTableConfig',
        path: '/lowcode/table-config',
        component: () => import('#/views/lowcode/table-config/index.vue'),
        meta: {
          icon: 'lucide:settings',
          title: '表配置管理',
          hideInMenu: true,
        },
      },
      {
        name: 'LowcodeTableConfigEdit',
        path: '/lowcode/table-config/edit',
        component: () => import('#/views/lowcode/table-config/edit/index.vue'),
        meta: {
          title: '表配置编辑',
          hideInMenu: true,
        },
      },
    ],
  },
];

export default routes;